package com.chy.utilsdemo.tiyu;

import java.util.HashMap;
import java.util.Map;

/**
 * 功能：体育项目 - API请求
 * <p>
 * ──────────────────────────────────────────
 * version  变更日期       修改人    修改说明
 * ------------------------------------------
 * V1.0.0   2022/7/7     CHY     初版
 * ──────────────────────────────────────────
 */
public class ApiTest {

    public static void main(String[] args) {

        String time = System.currentTimeMillis() + "";
        System.out.println(time);

        // 生产环境体育
        Map<String, String> params = new HashMap<>();
        params.put("API-SYSTEM-ID", "6ECF67F72A09444CB977F565EE213530");
        params.put("API-TIMESTAMP", time);
        String signFromServer = SignUtil.signBySM3(params, "FB27E1FEC40244C7B08BB86A88FD1F32");
        System.out.println(signFromServer);


        // 莆田行业综合监管
        Map<String, String> params2 = new HashMap<>();
        params.put("API-SYSTEM-ID", "BA6423F29C67453FBB395999C75BE8BA");
        params.put("API-TIMESTAMP", time);
        String signFromServer2 = SignUtil.signBySM3(params2, "FEECBFA631F547099B57174719C2A3B8");
        System.out.println(signFromServer2);
    }

}
